module ParserTests

open Parser
open NUnit.Framework
open FsUnit

// ToSet tests
[<TestFixture>] 
type ``Given a string of one or more characters ToSet should`` ()=
    [<Test>] 
        member test.
            ``when it contains a single character it should return a set with that single character`` () =
            let a = ToSet "a"
            let expected = Set.ofSeq ["a"]
            a |> should equal expected
    
    [<Test>] 
        member test.
            ``when it contains several of the same character it should return a set of only one element with that single character`` () =
            let  a = ToSet "aa"
            let expected = Set.ofSeq ["a"]
            a |> should equal expected

    [<Test>] 
        member test.
            ``when it contains several different unique characters it should return a SET of all those characters`` () =
            let a = ToSet "bcdea"
            let expected = (Set.ofSeq ["a";"b";"c";"d";"e"])
            a |> should equal expected

    [<Test>] 
        member test.
            ``when it is a range it should return a SET of all those characters in the range`` () =
            let a = GetRange "c-e"
            let expected = (Set.ofSeq ["c";"d";"e"])
            a |> should equal expected

        
//
//    [<Test>] 
//        member test.
//            ``when it contains several different unique characters it should return a SET of all those characters`` () =
//            let  (ToSet a) = "bcdea"
//            let expected = (Set.ofSeq ["a";"b";"c";"d";"e"])
//            a |> should equal expected

//// Lower Case Characters
//[<TestFixture>] 
//type ``Given a string of one or more characters`` ()=
//   
//    [<Test>] 
//    member test.
//        ``when it contains a single character it should parse to that single character`` () =
//        let  (Character a) = "a"
//        let expected = Set.ofSeq ["a"]
//        a |> should equal expected
//
//
//    [<Test>] 
//    member test.
//        ``when it contains two character it should parse to that those characters`` ()=
//        let  (Character myChar) = "ab"
//        let expected = Set.ofSeq ["a";"b"]
//        myChar |> should equal expected
//
//    [<Test>] 
//    member test.
//        ``when it contains a range of characters it should parse to all the characters in that range`` ()=
//        let  (Character myChar) = "a-d"
//        let expected = Set.ofSeq ["a";"b";"c";"d"]
//        myChar |> should equal expected
//
//    [<Test>] 
//    member test.
//        ``when it contains a COMPLEX range of characters it should parse to all the characters in that range`` ()=
//        let  (Character myChar) = "g-u"
//        let expected = Set.ofSeq ["g";"h";"i";"j";"k";"l";"m";"o";"n";"p";"q";"r";"s";"t";"u"]
//        myChar |> should equal expected
//
//
//// UPPERCASE CHARACTERS
//[<TestFixture>] 
//type ``Given a string of one or more UPPERCASE characters`` ()=
//   
//    [<Test>] 
//    member test.
//        ``when it contains a single character it should parse to that single character`` () =
//        let  (Character a) = "A"
//        let expected = Set.ofSeq ["A"]
//        a |> should equal expected
//
//
//    [<Test>] 
//    member test.
//        ``when it contains two character it should parse to that those characters`` ()=
//        let  (Character myChar) = "AB"
//        let expected = Set.ofSeq ["A"; "B"]
//        myChar |> should equal expected
//
//    [<Test>] 
//    member test.
//        ``when it contains a range of characters it should parse to all the characters in that range`` ()=
//        let  (Character myChar) = "A-D"
//        let expected = Set.ofSeq ["A"; "B"; "C"; "D"]
//        myChar |> should equal expected
//
//    [<Test>] 
//    member test.
//        ``when it contains a COMPLEX range of characters it should parse to all the characters in that range`` ()=
//        let  (Character myChar) = "G-U"
//        let expected = Set.ofSeq ["G";"H";"I";"J";"K";"L";"M";"O";"N";"P";"Q";"R";"S";"T";"U"]
//        myChar |> should equal expected
//
//// Numbers/digits
//[<TestFixture>] 
//type ``Given a string of one or more numbers`` ()=
//   
//    [<Test>] 
//    member test.
//        ``when it contains a single number it should parse to that single number`` () =
//        let  (Character a) = "1"
//        let expected = Set.ofSeq ["1"]
//        a |> should equal expected
//
//
//    [<Test>] 
//    member test.
//        ``when it contains two numbers it should parse to that those numbers`` ()=
//        let  (Character myChar) = "13"
//        let expected = Set.ofSeq ["1"; "3"]
//        myChar |> should equal expected
//
//    [<Test>] 
//    member test.
//        ``when it contains a range of numbers it should parse to all the numbers in that range`` ()=
//        let  (Character myChar) = "1-3"
//        let expected = Set.ofSeq ["1"; "2"; "3"]
//        myChar |> should equal expected
//
//    [<Test>] 
//    member test.
//        ``when it contains a COMPLEX range of numbers it should parse to all the numbers in that range`` ()=
//        let  (Character myChar) = "4-8"
//        let expected = Set.ofSeq ["4";"5";"6";"7";"8"]
//        myChar |> should equal expected